import java.util.Arrays;

public class TestMain {
    public static void main(String[] args) {

        Solution solution = new Solution();
//
//        int[][] L = {{1,2,3},{4,5,6},{7,8,9}};
//        System.out.println(Arrays.toString(solution.spiralOrder(L)));
//
//
//        int[][] M = {{1,2,3,5},{4,5,6,8},{7,8,9,2}};
//        System.out.println(Arrays.toString(solution.spiralOrder(M)));
//
//        int[][] N = {{6,9,7}};
//        System.out.println(Arrays.toString(solution.spiralOrder(N)));
//
//
//        int[][] O= {{1},{4},{7}};
//        System.out.println(Arrays.toString(solution.spiralOrder(O)));
//
//        int[][] P = {{2,3,4},{5,6,7},{8,9,10},{11,12,13},{14,15,16}};
//        System.out.println(Arrays.toString(solution.spiralOrder(P)));

        int[][] Q = {{1}};
        System.out.println(Arrays.toString(solution.spiralOrder(Q)));

    }
}
